/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/*
 * laser_requisicion_detalle.java
 *
 * Created on 5/12/2011, 12:27:28 PM
 */

package sie_invdis;


import java.sql.*;
import javax.swing.*;
import java.awt.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.Calendar;
import java.text.*;
import java.text.ParseException;

/**
 *
 * @author Michelle
 */
public class laser_requisicion_detalle extends javax.swing.JFrame {

    private javax.swing.table.DefaultTableModel jtable_modelo_maquilla;
    private javax.swing.table.DefaultTableModel jtable_modelo_etiqueta;
    private javax.swing.table.DefaultTableModel jtable_modelo_exporta;
    private javax.swing.table.DefaultTableModel jtable_modelo_exporta_usoexel;
    private bd_conexion x = new bd_conexion() ;
       //se creaa la variable resultset
    private ResultSet rs = null;
    private SimpleDateFormat formateador = new SimpleDateFormat("dd-MM-yyyy");
    private SimpleDateFormat formateadoresta = new SimpleDateFormat("yyyy-MM-dd");

    /** Creates new form laser_requisicion_detalle */
    public laser_requisicion_detalle() {
     
        initComponents();
    }
    public laser_requisicion_detalle(String idfolio) {
        this.iniciar_modelo_de_tabla();
        this.iniciar_modelo_detetiqueta();
        this.iniciar_modelo_detexporta();
        this.iniciar_modelo_exportausoexel();
        initComponents();
        jtb_insumos.getColumnModel().getColumn(0).setPreferredWidth(30);//Cantidad
        jtb_insumos.getColumnModel().getColumn(1).setPreferredWidth(50);//Clave
        jtb_insumos.getColumnModel().getColumn(2).setPreferredWidth(60);//Descripcion
        jtb_insumos.getColumnModel().getColumn(3).setPreferredWidth(40);//altura de patron.
        jtb_insumos.getColumnModel().getColumn(4).setPreferredWidth(40);//ancho de patron
        jtb_insumos.getColumnModel().getColumn(5).setPreferredWidth(40);//ancho de tela
        jtb_insumos.getColumnModel().getColumn(6).setPreferredWidth(40);//ancho de corte
        jtb_insumos.getColumnModel().getColumn(7).setPreferredWidth(40);//Uso de Tela
        jtb_insumos.getColumnModel().getColumn(8).setPreferredWidth(40);//Piezas X linea
        jtb_insumos.getColumnModel().getColumn(9).setPreferredWidth(20);//Filas
        jtb_insumos.getColumnModel().getColumn(10).setPreferredWidth(35);//Total de Piezas
        jtb_insumos.getColumnModel().getColumn(11).setPreferredWidth(20);//Sobrante.
        jtb_insumos.getColumnModel().getColumn(12).setPreferredWidth(20);//Piezas X paquete
        jtb_insumos.getColumnModel().getColumn(13).setPreferredWidth(20);//Piezas X paquete
        jtb_insumos.getColumnModel().getColumn(14).setPreferredWidth(40);//Piezas x linea.
        jtb_insumos.getColumnModel().getColumn(15).setPreferredWidth(2);//Observaciones.
        this.carga_datos_catrequisiciones(3, idfolio);
        this.cargar_datos_detalle(0, idfolio);
        this.jpn_updatedetalle.setVisible(false);
        if (variables_global.getnivelusu()<3)
            {
                this.jpn_updatedetalle.setVisible(true);
            }
    }
private void iniciar_modelo_de_tabla()
    {
        jtable_modelo_maquilla=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_maquilla.addColumn("<html><b>cant.</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Anc.Pat</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Alt.Pat</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Anc.Tela</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Anc.Corte</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Uso Tela</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>PzasXLinea</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Filas</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>T. Pzas</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Sob.</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>PzxPaq</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>No Paq</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Observaciones</b></html>");
        jtable_modelo_maquilla.addColumn("<html><b>Id</b></html>");
    }
private void iniciar_modelo_detetiqueta()
    {
        jtable_modelo_etiqueta=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_etiqueta.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_etiqueta.addColumn("<html><b>Descripcion</b></html>");
        jtable_modelo_etiqueta.addColumn("<html><b>Folio Req</b></html>");
        jtable_modelo_etiqueta.addColumn("<html><b>No Paq</b></html>");
        jtable_modelo_etiqueta.addColumn("<html><b>Pzas x Paq</b></html>");
        jtable_modelo_etiqueta.addColumn("<html><b>Observaciones</b></html>");
    }
private void iniciar_modelo_detexporta()
    {
        jtable_modelo_exporta=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_exporta.addColumn("<html><b>Ancho Tela</b></html>");
        jtable_modelo_exporta.addColumn("<html><b>Clave</b></html>");
        jtable_modelo_exporta.addColumn("<html><b>Piezas</b></html>");
        jtable_modelo_exporta.addColumn("<html><b>Pzas x Paq</b></html>");
        jtable_modelo_exporta.addColumn("<html><b>Observaciones</b></html>");
    }
private void iniciar_modelo_exportausoexel()
    {
        jtable_modelo_exporta_usoexel=new javax.swing.table.DefaultTableModel();//Creo el modelo
        jtable_modelo_exporta_usoexel.addColumn("<html><b>Pzas</b></html>");
        jtable_modelo_exporta_usoexel.addColumn("<html><b>Patron</b></html>");
        jtable_modelo_exporta_usoexel.addColumn("<html><b>P. Ancho</b></html>");
        jtable_modelo_exporta_usoexel.addColumn("<html><b>P. Alto</b></html>");
        jtable_modelo_exporta_usoexel.addColumn("<html><b>Ancho Tela</b></html>");
    }
private void carga_datos_catrequisiciones(int opbus,String tbusca)
    {
      DecimalFormat miformat = new DecimalFormat("###,###,###,###");
      Object[] fnewRow = new Object[10];
       //invoco al metodo que trae el recordset de datos
        try
         {
            rs = x.sieuno_executediversosv2("select * from x1distribucion_laser_requisicion_doctos_cat("+opbus+",'"+tbusca+"') as (id integer,idstatus smallint,idclavepersonal integer,fechadocto date,fechaentrega date,fechavence date,idcliente character varying(12),obserdocto text,idtipomaquila smallint,hora time,nombrecliente character varying(80),describemaquila text,cantidad numeric,importecosto numeric,describestatus text);",variables_global.getconexiongral());
            while (rs.next())
                {
                    this.jtf_tipomaquila.setText(rs.getString("describemaquila"));
                    this.jtf_id.setText(rs.getString ("id"));
                    this.jtf_idstatus.setText(rs.getString("idstatus")+":"+rs.getString("describestatus"));
                    this.jtf_fechadocto.setText(this.fechaeuropea(rs.getString ("fechadocto"))+":"+DiaSemana(this.fechaeuropea(rs.getString ("fechadocto")))+" "+rs.getString ("hora").substring(0, 5));
                    this.jtf_idcliente.setText(rs.getString ("idcliente")+":"+rs.getString ("nombrecliente"));
                    this.jtf_observaciones.setText(rs.getString ("obserdocto"));
                    this.jtf_cantidadpiezas.setText(miformat.format(rs.getFloat("cantidad")));
                }
        }
        catch(Exception e)
        {
            System.out.println(e.getMessage());
        }
        //this.registrosobtenidos();
      }


private void cargar_datos_detalle(int opcion,String folio)
    {
     String textohtml="";
     textohtml="<tr><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th><th>Clave Articulo/Descripcion/foto</th></tr>";
     int fila=0;

    String piezasxfilas[]=null,totfilass[]=null,alturausadas[]=null,puentedetexto="",puentefnece="";
    Object[] fnewRow = new Object[16];
    Object[] fnewRoweti = new Object[6];
    Object[] fnewRowexp = new Object[5];
    Object[] fnewRowexpexe = new Object[5];
    while(jtable_modelo_maquilla.getRowCount()>0)jtable_modelo_maquilla.removeRow(0);
    while(jtable_modelo_etiqueta.getRowCount()>0)jtable_modelo_etiqueta.removeRow(0);
    while(jtable_modelo_exporta.getRowCount()>0)jtable_modelo_exporta.removeRow(0);
    while(jtable_modelo_exporta_usoexel.getRowCount()>0)jtable_modelo_exporta_usoexel.removeRow(0);
    float piezasxfila=0,totfilas=0,alturausada=0,filaajuste=0,filasneceenteras=0,piezascalculadas=0,totalmatusado=0;
    DecimalFormat miformat = new DecimalFormat("###,###,###,###.##");
    DecimalFormat miformatusado = new DecimalFormat("###,###,###,###");
    String texto="select * from x1distribucion_laser_requisicion_doctos_detalle_import("+opcion+",'"+folio+"') as (idreg integer,iddocto integer,idarti character varying(16),cantidad numeric,anchotela numeric,pzasxpaq numeric,obserpartida text,costo numeric,importecosto numeric,describeinsumo character varying(80),unidadent character varying(3),stockmin numeric,stockmax numeric);";
    System.out.println(texto);
            try
                {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                        while (rs.next())
                            {
                            if(rs.getFloat("cantidad")>0)
                                {
                                    filaajuste=0;
                                    System.out.println(piezasxfila);
                                    piezasxfila=rs.getFloat("anchotela")/rs.getFloat("stockmin");
                                    //System.out.println(piezasxfila);
                                    puentedetexto=miformat.format(piezasxfila).replace(".", ":").replace(",", ":");
                                    piezasxfilas=puentedetexto.split(":");
                                    System.out.println(piezasxfila);
                                    System.out.println(piezasxfilas[0]);
                                    totfilas=rs.getFloat("cantidad")/Float.parseFloat(piezasxfilas[0]);
                                   //System.out.println(totfilas);
                                     puentefnece=miformat.format(totfilas).replace(".", ":").replace(",", ":");
                                     totfilass=puentefnece.split(":");
                                     filasneceenteras=Float.parseFloat(totfilass[0]);
                                     if (totfilas>filasneceenteras)
                                        {
                                            filaajuste=1;
                                        }
                                    puentefnece=miformat.format(Float.parseFloat(totfilass[0])+filaajuste);
                                    alturausada=Float.parseFloat(puentefnece)*rs.getFloat("stockmax");
                                    piezascalculadas=Float.parseFloat(piezasxfilas[0])*Float.parseFloat(puentefnece);
                                    //System.out.println(alturausada);
                                    fnewRow[0]=rs.getString("cantidad");
                                    fnewRow[1]=rs.getString("idarti");
                                    fnewRow[2]=rs.getString("describeinsumo");
                                    fnewRow[3]=rs.getString("stockmin");
                                    fnewRow[4]=rs.getString("stockmax");
                                    fnewRow[5]=rs.getString("anchotela");
                                    fnewRow[6]=miformat.format(Float.parseFloat(piezasxfilas[0])*rs.getFloat("stockmin"));
                                    //fnewRow[7]=miformat.format(alturausada)+"="+miformat.format(alturausada/100)+"MT";
                                    fnewRow[7]=miformat.format(alturausada/100)+"MT";
                                    fnewRow[8]=piezasxfilas[0];
                                    fnewRow[9]=puentefnece;
                                    fnewRow[10]=miformat.format(piezascalculadas);
                                    fnewRow[11]=miformat.format(piezascalculadas-rs.getFloat("cantidad"));
                                    fnewRow[12]=rs.getString("pzasxpaq");
                                    fnewRow[13]=miformat.format(rs.getFloat("cantidad")/rs.getFloat("pzasxpaq"))+"Pq";
                                    fnewRow[14]=rs.getString("obserpartida");
                                    fnewRow[15]=rs.getString("idreg");
                                    jtable_modelo_maquilla.addRow(fnewRow);
                                    fnewRoweti[0]=rs.getString("idarti");
                                    fnewRoweti[1]=rs.getString("describeinsumo");
                                    fnewRoweti[2]=rs.getString("iddocto");
                                    fnewRoweti[3]=miformat.format(rs.getFloat("cantidad")/rs.getFloat("pzasxpaq"));
                                    fnewRoweti[4]=rs.getString("pzasxpaq")+" Pzas";
                                    fnewRoweti[5]=rs.getString("obserpartida");
                                    jtable_modelo_etiqueta.addRow(fnewRoweti);
                                    fnewRowexp[0]=rs.getString("anchotela");
                                    fnewRowexp[1]=rs.getString("idarti");
                                    fnewRowexp[2]=rs.getString("cantidad");
                                    fnewRowexp[3]=miformat.format(rs.getFloat("pzasxpaq"));
                                    fnewRowexp[4]=rs.getString("obserpartida");
                                    jtable_modelo_exporta.addRow(fnewRowexp);
                                    fnewRowexpexe[0]=rs.getString("cantidad");
                                    fnewRowexpexe[1]=rs.getString("idarti");
                                    fnewRowexpexe[2]=rs.getString("stockmin");
                                    fnewRowexpexe[3]=rs.getString("stockmax");
                                    fnewRowexpexe[4]=rs.getString("anchotela");
                                    jtable_modelo_exporta_usoexel.addRow(fnewRowexpexe);
                                    totalmatusado+=alturausada;
                                    if (fila<=0)
                                        {
                                            textohtml+= "<tr>";
                                        }
                                    fila++;
                                    textohtml+="<th>"+rs.getString ("idarti")+"<br>"+rs.getString ("describeinsumo")+ " "+rs.getString ("cantidad")+ "<br>"+"<img src=\"http://"+variables_global.getHost()+"/javaweb/laser/patrones/"+rs.getString("idarti")+".JPG\" width=230 height=190 border=0 alt=\"Foto Articulo\" />"+"</th>";
                                    if (fila>=4)
                                        {
                                            textohtml+= "</tr>";
                                            fila=0;
                                        }
                                }
                            }
                        this.jtf_materialusado.setText(miformatusado.format(totalmatusado)+"="+miformat.format(totalmatusado/100)+"MT");
                    }
                catch(Exception e)
                        {
                              System.out.println(e.getMessage());
                              JOptionPane.showMessageDialog(null,"Error conexion", "Sistema Integral(Integral) : Error",1);
                        }
            this.jepn_fotos.setText("<html><head></head><body><table>"+textohtml+"</table></body></html>");
    }
private void cargar_datos_detalle_etiqueta(int opcion,String folio)
    {
    String piezasxfilas[]=null,totfilass[]=null,alturausadas[]=null,puentedetexto="",puentefnece="";
    Object[] fnewRoweti = new Object[6];
    float piezasxfila=0,totfilas=0,alturausada=0,filaajuste=0,filasneceenteras=0,piezascalculadas=0,totalmatusado=0;
    DecimalFormat miformat = new DecimalFormat("###,###,###,###.##");
    DecimalFormat miformatusado = new DecimalFormat("###,###,###,###");
    String texto="select * from x1distribucion_laser_requisicion_doctos_detalle_import("+opcion+",'"+folio+"') as (idreg integer,iddocto integer,idarti character varying(16),cantidad numeric,anchotela numeric,pzasxpaq numeric,obserpartida text,costo numeric,importecosto numeric,describeinsumo character varying(80),unidadent character varying(3),stockmin numeric,stockmax numeric);";
    System.out.println(texto);
            try
                {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                        while (rs.next())
                            {
                            if(rs.getFloat("cantidad")>0)
                                {
                                    fnewRoweti[0]=rs.getString("idarti");
                                    fnewRoweti[1]=rs.getString("describeinsumo");
                                    fnewRoweti[2]=rs.getString("iddocto");
                                    fnewRoweti[3]=miformat.format(rs.getFloat("cantidad")/rs.getFloat("pzasxpaq"));
                                    fnewRoweti[4]=rs.getString("pzasxpaq")+" Pzas";
                                    fnewRoweti[5]=rs.getString("obserpartida");
                                    jtable_modelo_etiqueta.addRow(fnewRoweti);
                                 }
                            }
                    }
                catch(Exception e)
                        {
                              System.out.println(e.getMessage());
                              JOptionPane.showMessageDialog(null,"Error conexion", "Sistema Integral(Integral) : Error",1);
                        }
    }
private void cargar_datos_detalle_expusoexe(int opcion,String folio)
    {
    String piezasxfilas[]=null,totfilass[]=null,alturausadas[]=null,puentedetexto="",puentefnece="";
    Object[] fnewRowexpexe = new Object[5];
    float piezasxfila=0,totfilas=0,alturausada=0,filaajuste=0,filasneceenteras=0,piezascalculadas=0,totalmatusado=0;
    DecimalFormat miformat = new DecimalFormat("###,###,###,###.##");
    DecimalFormat miformatusado = new DecimalFormat("###,###,###,###");
    String texto="select * from x1distribucion_laser_requisicion_doctos_detalle_import("+opcion+",'"+folio+"') as (idreg integer,iddocto integer,idarti character varying(16),cantidad numeric,anchotela numeric,pzasxpaq numeric,obserpartida text,costo numeric,importecosto numeric,describeinsumo character varying(80),unidadent character varying(3),stockmin numeric,stockmax numeric);";
    System.out.println(texto);
            try
                {
                rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
                        while (rs.next())
                            {
                            if(rs.getFloat("cantidad")>0)
                                {
                                    fnewRowexpexe[0]=rs.getString("cantidad");
                                    fnewRowexpexe[1]=rs.getString("idarti");
                                    fnewRowexpexe[2]=rs.getString("stockmin");
                                    fnewRowexpexe[3]=rs.getString("stockmax");
                                    fnewRowexpexe[4]=rs.getString("anchotela");
                                    jtable_modelo_exporta_usoexel.addRow(fnewRowexpexe);

                                 }
                            }
                    }
                catch(Exception e)
                        {
                              System.out.println(e.getMessage());
                              JOptionPane.showMessageDialog(null,"Error conexion", "Sistema Integral(Integral) : Error",1);
                        }
    }
private void actualiza_docto(int opcion,String id,String texto1)
    {
        String texto="select * from x1distribucion_laser_artic_insumosrequi_doctos_update("+opcion+",'"+id+"','"+texto1+"','')";
        try
            {
            rs = x.sieuno_executediversosv2(texto,variables_global.getconexiongral());
            }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
                //JOptionPane.showMessageDialog(null,"Error conexion", "Sistema Integral(Integral) : Error",1);
            }
    }

private String  fechaeuropea(String fecha) {

         //resibe cadena de fecha en formato americano yyyy-MM-dd
        java.util.Date fechaestaeuropa=null;
       SimpleDateFormat formateadorestaeuropa = new SimpleDateFormat("dd-MM-yyyy");
       String cadenafecha="";
        try
         {
          fechaestaeuropa = formateadoresta.parse(fecha);
         }
        catch (ParseException e)
          {
             //Error, la cadena de texto no se puede convertir en fecha.
          }
       cadenafecha= formateadorestaeuropa.format(fechaestaeuropa);
       return cadenafecha;
    }
private String DiaSemana(String fe) {
         String dia = "";
       java.util.Date fecha=null;
         try
            {
             fecha = formateador.parse(fe);

           }
        catch (ParseException e)
            {
            //Error, la cadena de texto no se puede convertir en fecha.
            }
        Calendar cal= Calendar.getInstance();
        cal.setTime(fecha);
        //ojo para establecer o recetear cada parte de la fecha por separado
        //cal.set(Calendar.YEAR, fecha.getYear());
        //cal.set(Calendar.MONTH, fecha.getMonth());
        //cal.set(Calendar.DAY_OF_MONTH, fecha.getDay());
        int diaInt = cal.get(Calendar.DAY_OF_WEEK);
        switch (diaInt) {
            case 1:
                dia = "Domingo";
                break;
            case 2:
                dia = "Lunes";
                break;
            case 3:
                dia = "Martes";
                break;
            case 4:
                dia = "Miercoles";
                break;
            case 5:
                dia = "Jueves";
                break;
            case 6:
                dia = "Viernes";
                break;
            case 7:
                dia = "Sabado";
                break;

        }
        return dia;
    }

private void imprimir(int pag,float ptotal,String folio)
    {

     java.util.Date fechahoya=new Date();

     this.objimpresora=new laser_entradas_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("          Maquila Insumos");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Fecha:"+this.jtf_fechadocto.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Folio:"+folio+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Status Documento:"+"EN PROCESO"+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Cliente o Tienda:"+this.jtf_idcliente.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Observaciones:"+this.jtf_observaciones.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Total Piezas: "+this.jtf_cantidadpiezas.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Total Tela: "+this.jtf_materialusado.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Tela Entregada: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Hora Entrega: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Fecha de Entrega: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jtb_insumos);
     this.objimpresora.imprimir_all(3,pag);
    }
private void imprimirbasica(int pag,float ptotal,String folio)
    {

     java.util.Date fechahoya=new Date();

     this.objimpresora=new laser_entradas_imprimir();

     this.objimpresora.setOneItem_cadenas_a_imprimir("          Maquila Insumos");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("Fecha:"+this.+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Fecha:"+this.jtf_fechadocto.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Folio:"+folio+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Status Documento:"+"EN PROCESO"+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Cliente o Tienda:"+this.jtf_idcliente.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Observaciones:"+this.jtf_observaciones.getText()+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     //this.objimpresora.setOneItem_cadenas_a_imprimir("paginas:"+ pag + " de "+ptotal+"");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Total Piezas: "+this.jtf_cantidadpiezas.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Total Tela: "+this.jtf_materialusado.getText());
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Tela Entregada: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Hora Entrega: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("          Fecha de Entrega: ______________");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("..");
     this.objimpresora.setOneItem_cadenas_a_imprimir("*");
     this.objimpresora.setObjeto_tabla(jtb_insumos);
     this.objimpresora.imprimir_all(5,pag);
    }
private void dioclick(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
            System.out.println("dio doble  click en subfamilia");
            int fila = jtb_insumos.getSelectedRow();
            this.jtf_idserial.setText(this.jtable_modelo_maquilla.getValueAt(fila, 15).toString());
            this.jtf_idinsumo.setText(this.jtable_modelo_maquilla.getValueAt(fila, 1).toString());
            this.jtf_anchotela.setText(this.jtable_modelo_maquilla.getValueAt(fila, 5).toString());
            this.jtf_piezas.setText(this.jtable_modelo_maquilla.getValueAt(fila, 0).toString());
            this.jtf_pzasxpake.setText(this.jtable_modelo_maquilla.getValueAt(fila, 12).toString());
            this.jtf_detalleobser.setText(this.jtable_modelo_maquilla.getValueAt(fila, 14).toString());
            this.jtf_idinsumo.setEditable(false);
            this.jcbx_nuevo.setSelected(false);
    }
private void detallerequisicion_actualiza(int opcion,String registro,String idarticulo,String anchotela,String cantidad,String pzasxpaquete,String observacion)
    {
       //invoco al metodo que trae el recordset de datos
    int encontrado=0;
    try
         {
            rs = x.sieuno_executediversosv2("select * from x1distribucion_laser_artic_insumosrequi_doctos_detupdate("+opcion+",'"+registro+"','"+idarticulo+"','"+cantidad+"','"+anchotela+"','"+pzasxpaquete+"','"+observacion+"');",variables_global.getconexiongral());
            while (rs.next())
                {
                     encontrado=rs.getInt(1);
                }
        }
        catch(Exception e)
            {
                System.out.println(e.getMessage());
            }
       if (encontrado==1)
            {
               this.cargar_datos_detalle(0, this.jtf_id.getText());
               JOptionPane.showMessageDialog(null,"Documento Actualizado", "Sistema Integral(Requisicion Detalle)",1);
            }
       else
            {
               JOptionPane.showMessageDialog(null,"Error Documento no Actualizado!", "Sistema Integral(Inventarios: Alta) : Ayuda",1);
            }
     }
    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jpn_encabezado = new javax.swing.JPanel();
        jLabel2 = new javax.swing.JLabel();
        jLabel3 = new javax.swing.JLabel();
        jtf_observaciones = new javax.swing.JTextField();
        jLabel4 = new javax.swing.JLabel();
        jLabel6 = new javax.swing.JLabel();
        jtf_idcliente = new javax.swing.JTextField();
        jtf_fechadocto = new javax.swing.JTextField();
        jtf_tipomaquila = new javax.swing.JTextField();
        jLabel1 = new javax.swing.JLabel();
        jtf_id = new javax.swing.JTextField();
        jLabel5 = new javax.swing.JLabel();
        jtf_idstatus = new javax.swing.JTextField();
        jPanel1 = new javax.swing.JPanel();
        jbtn_imprimir3 = new javax.swing.JButton();
        jbtn_salir = new javax.swing.JButton();
        jbtn_helpayudame = new javax.swing.JButton();
        jTabbedPane1 = new javax.swing.JTabbedPane();
        jpn_cuerpo = new javax.swing.JPanel();
        jScrollPane1 = new javax.swing.JScrollPane();
        jtb_insumos = new javax.swing.JTable()
        //{
            //  public boolean isCellEditable(int rowIndex, int mColIndex) {
                //    if (mColIndex < 3)
                //  return false;
                //else
                //return true;
                //}
            //}
        ;
        jLabel19 = new javax.swing.JLabel();
        jtf_cantidadpiezas = new javax.swing.JTextField();
        jLabel7 = new javax.swing.JLabel();
        jtf_materialusado = new javax.swing.JTextField();
        jpn_updatedetalle = new javax.swing.JPanel();
        jtf_idinsumo = new javax.swing.JTextField();
        jLabel8 = new javax.swing.JLabel();
        jLabel9 = new javax.swing.JLabel();
        jtf_anchotela = new javax.swing.JTextField();
        jLabel10 = new javax.swing.JLabel();
        jtf_piezas = new javax.swing.JTextField();
        jLabel11 = new javax.swing.JLabel();
        jtf_pzasxpake = new javax.swing.JTextField();
        jLabel12 = new javax.swing.JLabel();
        jtf_idserial = new javax.swing.JTextField();
        jLabel13 = new javax.swing.JLabel();
        jtf_detalleobser = new javax.swing.JTextField();
        jbtn_detactualiza = new javax.swing.JButton();
        jcbx_nuevo = new javax.swing.JCheckBox();
        jchbx_veridinsumo = new javax.swing.JCheckBox();
        jPanel2 = new javax.swing.JPanel();
        jScrollPane2 = new javax.swing.JScrollPane();
        jtb_detalleetiqueta = new javax.swing.JTable()
        //{
            //  public boolean isCellEditable(int rowIndex, int mColIndex) {
                //    if (mColIndex < 3)
                //  return false;
                //else
                //return true;
                //}
            //}
        ;
        jLabel15 = new javax.swing.JLabel();
        jtf_folionvo = new javax.swing.JTextField();
        jPanel3 = new javax.swing.JPanel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jtb_detalleexportar = new javax.swing.JTable()
        //{
            //  public boolean isCellEditable(int rowIndex, int mColIndex) {
                //    if (mColIndex < 3)
                //  return false;
                //else
                //return true;
                //}
            //}
        ;
        jPanel4 = new javax.swing.JPanel();
        jLabel14 = new javax.swing.JLabel();
        jtf_observ_update = new javax.swing.JTextField();
        jButton1 = new javax.swing.JButton();
        jPanel5 = new javax.swing.JPanel();
        jScrollPane4 = new javax.swing.JScrollPane();
        jtb_detalle_expexe = new javax.swing.JTable()
        //{
            //  public boolean isCellEditable(int rowIndex, int mColIndex) {
                //    if (mColIndex < 3)
                //  return false;
                //else
                //return true;
                //}
            //}
        ;
        jLabel16 = new javax.swing.JLabel();
        jtf_folionvoexpexe = new javax.swing.JTextField();
        jPanel6 = new javax.swing.JPanel();
        jScrollPane5 = new javax.swing.JScrollPane();
        jepn_fotos = new javax.swing.JEditorPane();
        jMenuBar1 = new javax.swing.JMenuBar();
        jMenu1 = new javax.swing.JMenu();
        jmni_imprimir = new javax.swing.JMenuItem();
        jmni_imprimircompleto = new javax.swing.JMenuItem();
        jmni_salir = new javax.swing.JMenuItem();
        jMenu2 = new javax.swing.JMenu();
        jmni_escape = new javax.swing.JMenuItem();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        org.jdesktop.application.ResourceMap resourceMap = org.jdesktop.application.Application.getInstance(sie_invdis.Sie_invdisApp.class).getContext().getResourceMap(laser_requisicion_detalle.class);
        setTitle(resourceMap.getString("Form.title")); // NOI18N
        setName("Form"); // NOI18N

        jpn_encabezado.setBorder(javax.swing.BorderFactory.createTitledBorder(resourceMap.getString("jpn_encabezado.border.title"))); // NOI18N
        jpn_encabezado.setName("jpn_encabezado"); // NOI18N

        jLabel2.setText(resourceMap.getString("jLabel2.text")); // NOI18N
        jLabel2.setName("jLabel2"); // NOI18N

        jLabel3.setText(resourceMap.getString("jLabel3.text")); // NOI18N
        jLabel3.setName("jLabel3"); // NOI18N

        jtf_observaciones.setEditable(false);
        jtf_observaciones.setName("jtf_observaciones"); // NOI18N
        jtf_observaciones.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_observacionesActionPerformed(evt);
            }
        });

        jLabel4.setText(resourceMap.getString("jLabel4.text")); // NOI18N
        jLabel4.setName("jLabel4"); // NOI18N

        jLabel6.setText(resourceMap.getString("jLabel6.text")); // NOI18N
        jLabel6.setName("jLabel6"); // NOI18N

        jtf_idcliente.setEditable(false);
        jtf_idcliente.setName("jtf_idcliente"); // NOI18N

        jtf_fechadocto.setEditable(false);
        jtf_fechadocto.setText(resourceMap.getString("jtf_fechadocto.text")); // NOI18N
        jtf_fechadocto.setName("jtf_fechadocto"); // NOI18N

        jtf_tipomaquila.setEditable(false);
        jtf_tipomaquila.setText(resourceMap.getString("jtf_tipomaquila.text")); // NOI18N
        jtf_tipomaquila.setName("jtf_tipomaquila"); // NOI18N

        jLabel1.setText(resourceMap.getString("jLabel1.text")); // NOI18N
        jLabel1.setName("jLabel1"); // NOI18N

        jtf_id.setEditable(false);
        jtf_id.setText(resourceMap.getString("jtf_id.text")); // NOI18N
        jtf_id.setName("jtf_id"); // NOI18N

        jLabel5.setText(resourceMap.getString("jLabel5.text")); // NOI18N
        jLabel5.setName("jLabel5"); // NOI18N

        jtf_idstatus.setEditable(false);
        jtf_idstatus.setText(resourceMap.getString("jtf_idstatus.text")); // NOI18N
        jtf_idstatus.setName("jtf_idstatus"); // NOI18N

        javax.swing.GroupLayout jpn_encabezadoLayout = new javax.swing.GroupLayout(jpn_encabezado);
        jpn_encabezado.setLayout(jpn_encabezadoLayout);
        jpn_encabezadoLayout.setHorizontalGroup(
            jpn_encabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpn_encabezadoLayout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel2)
                .addGap(18, 18, 18)
                .addComponent(jtf_fechadocto, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel1)
                .addGap(9, 9, 9)
                .addComponent(jtf_id, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jLabel5)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_idstatus, javax.swing.GroupLayout.PREFERRED_SIZE, 117, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel3)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_idcliente, javax.swing.GroupLayout.DEFAULT_SIZE, 258, Short.MAX_VALUE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jLabel6)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_tipomaquila, javax.swing.GroupLayout.PREFERRED_SIZE, 162, javax.swing.GroupLayout.PREFERRED_SIZE))
            .addGroup(jpn_encabezadoLayout.createSequentialGroup()
                .addComponent(jLabel4)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addComponent(jtf_observaciones, javax.swing.GroupLayout.DEFAULT_SIZE, 857, Short.MAX_VALUE)
                .addGap(97, 97, 97))
        );
        jpn_encabezadoLayout.setVerticalGroup(
            jpn_encabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpn_encabezadoLayout.createSequentialGroup()
                .addGroup(jpn_encabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_fechadocto, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel1)
                    .addComponent(jtf_id, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel6)
                    .addComponent(jtf_tipomaquila, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel5)
                    .addComponent(jtf_idstatus, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(jtf_idcliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                .addGroup(jpn_encabezadoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jtf_observaciones, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel4))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jPanel1.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jPanel1.setName("jPanel1"); // NOI18N

        jbtn_imprimir3.setIcon(resourceMap.getIcon("jbtn_imprimir3.icon")); // NOI18N
        jbtn_imprimir3.setText(resourceMap.getString("jbtn_imprimir3.text")); // NOI18N
        jbtn_imprimir3.setName("jbtn_imprimir3"); // NOI18N
        jbtn_imprimir3.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_imprimir3ActionPerformed(evt);
            }
        });

        jbtn_salir.setIcon(resourceMap.getIcon("jbtn_salir.icon")); // NOI18N
        jbtn_salir.setText(resourceMap.getString("jbtn_salir.text")); // NOI18N
        jbtn_salir.setName("jbtn_salir"); // NOI18N
        jbtn_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_salirActionPerformed(evt);
            }
        });

        jbtn_helpayudame.setIcon(resourceMap.getIcon("jbtn_helpayudame.icon")); // NOI18N
        jbtn_helpayudame.setText(resourceMap.getString("jbtn_helpayudame.text")); // NOI18N
        jbtn_helpayudame.setName("jbtn_helpayudame"); // NOI18N
        jbtn_helpayudame.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_helpayudameActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jbtn_imprimir3)
                .addGap(121, 121, 121)
                .addComponent(jbtn_salir)
                .addGap(121, 121, 121)
                .addComponent(jbtn_helpayudame)
                .addContainerGap(467, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                .addComponent(jbtn_imprimir3)
                .addComponent(jbtn_helpayudame)
                .addComponent(jbtn_salir))
        );

        jTabbedPane1.setName("jTabbedPane1"); // NOI18N
        jTabbedPane1.addChangeListener(new javax.swing.event.ChangeListener() {
            public void stateChanged(javax.swing.event.ChangeEvent evt) {
                jTabbedPane1StateChanged(evt);
            }
        });

        jpn_cuerpo.setBorder(javax.swing.BorderFactory.createEmptyBorder(1, 1, 1, 1));
        jpn_cuerpo.setName("jpn_cuerpo"); // NOI18N

        jScrollPane1.setName("jScrollPane1"); // NOI18N

        jtb_insumos.setModel(this.jtable_modelo_maquilla);
        jtb_insumos.setName("jtb_insumos"); // NOI18N
        jtb_insumos.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                jtb_insumosMouseClicked(evt);
                if(evt.getClickCount() >= 1)
                {
                    dioclick(evt);
                }
            }
        });
        jScrollPane1.setViewportView(jtb_insumos);

        jLabel19.setText(resourceMap.getString("jLabel19.text")); // NOI18N
        jLabel19.setName("jLabel19"); // NOI18N

        jtf_cantidadpiezas.setEditable(false);
        jtf_cantidadpiezas.setName("jtf_cantidadpiezas"); // NOI18N

        jLabel7.setText(resourceMap.getString("jLabel7.text")); // NOI18N
        jLabel7.setName("jLabel7"); // NOI18N

        jtf_materialusado.setEditable(false);
        jtf_materialusado.setName("jtf_materialusado"); // NOI18N

        jpn_updatedetalle.setBorder(javax.swing.BorderFactory.createEtchedBorder());
        jpn_updatedetalle.setName("jpn_updatedetalle"); // NOI18N

        jtf_idinsumo.setEditable(false);
        jtf_idinsumo.setText(resourceMap.getString("jtf_idinsumo.text")); // NOI18N
        jtf_idinsumo.setName("jtf_idinsumo"); // NOI18N

        jLabel8.setText(resourceMap.getString("jLabel8.text")); // NOI18N
        jLabel8.setName("jLabel8"); // NOI18N

        jLabel9.setText(resourceMap.getString("jLabel9.text")); // NOI18N
        jLabel9.setName("jLabel9"); // NOI18N

        jtf_anchotela.setText(resourceMap.getString("jtf_anchotela.text")); // NOI18N
        jtf_anchotela.setName("jtf_anchotela"); // NOI18N

        jLabel10.setText(resourceMap.getString("jLabel10.text")); // NOI18N
        jLabel10.setName("jLabel10"); // NOI18N

        jtf_piezas.setText(resourceMap.getString("jtf_piezas.text")); // NOI18N
        jtf_piezas.setAutoscrolls(false);
        jtf_piezas.setName("jtf_piezas"); // NOI18N

        jLabel11.setText(resourceMap.getString("jLabel11.text")); // NOI18N
        jLabel11.setName("jLabel11"); // NOI18N

        jtf_pzasxpake.setText(resourceMap.getString("jtf_pzasxpake.text")); // NOI18N
        jtf_pzasxpake.setName("jtf_pzasxpake"); // NOI18N

        jLabel12.setText(resourceMap.getString("jLabel12.text")); // NOI18N
        jLabel12.setName("jLabel12"); // NOI18N

        jtf_idserial.setEditable(false);
        jtf_idserial.setText(resourceMap.getString("jtf_idserial.text")); // NOI18N
        jtf_idserial.setName("jtf_idserial"); // NOI18N

        jLabel13.setText(resourceMap.getString("jLabel13.text")); // NOI18N
        jLabel13.setName("jLabel13"); // NOI18N

        jtf_detalleobser.setText(resourceMap.getString("jtf_detalleobser.text")); // NOI18N
        jtf_detalleobser.setName("jtf_detalleobser"); // NOI18N

        jbtn_detactualiza.setIcon(resourceMap.getIcon("jbtn_detactualiza.icon")); // NOI18N
        jbtn_detactualiza.setText(resourceMap.getString("jbtn_detactualiza.text")); // NOI18N
        jbtn_detactualiza.setName("jbtn_detactualiza"); // NOI18N
        jbtn_detactualiza.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jbtn_detactualizaActionPerformed(evt);
            }
        });

        jcbx_nuevo.setText(resourceMap.getString("jcbx_nuevo.text")); // NOI18N
        jcbx_nuevo.setName("jcbx_nuevo"); // NOI18N
        jcbx_nuevo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jcbx_nuevoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpn_updatedetalleLayout = new javax.swing.GroupLayout(jpn_updatedetalle);
        jpn_updatedetalle.setLayout(jpn_updatedetalleLayout);
        jpn_updatedetalleLayout.setHorizontalGroup(
            jpn_updatedetalleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpn_updatedetalleLayout.createSequentialGroup()
                .addGroup(jpn_updatedetalleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jpn_updatedetalleLayout.createSequentialGroup()
                        .addComponent(jLabel12)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_idserial, javax.swing.GroupLayout.PREFERRED_SIZE, 18, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel8)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_idinsumo, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel9)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_anchotela, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel10)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_piezas, javax.swing.GroupLayout.PREFERRED_SIZE, 38, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel11)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_pzasxpake, javax.swing.GroupLayout.DEFAULT_SIZE, 60, Short.MAX_VALUE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jbtn_detactualiza))
                    .addGroup(jpn_updatedetalleLayout.createSequentialGroup()
                        .addComponent(jLabel13)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_detalleobser, javax.swing.GroupLayout.PREFERRED_SIZE, 354, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jcbx_nuevo)))
                .addContainerGap())
        );
        jpn_updatedetalleLayout.setVerticalGroup(
            jpn_updatedetalleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpn_updatedetalleLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(jpn_updatedetalleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel12)
                    .addComponent(jtf_idserial, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel8)
                    .addComponent(jtf_idinsumo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel9)
                    .addComponent(jtf_anchotela, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel10)
                    .addComponent(jtf_piezas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel11)
                    .addComponent(jtf_pzasxpake, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jbtn_detactualiza))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpn_updatedetalleLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel13)
                    .addComponent(jtf_detalleobser, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jcbx_nuevo))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        jchbx_veridinsumo.setText(resourceMap.getString("jchbx_veridinsumo.text")); // NOI18N
        jchbx_veridinsumo.setName("jchbx_veridinsumo"); // NOI18N
        jchbx_veridinsumo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jchbx_veridinsumoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jpn_cuerpoLayout = new javax.swing.GroupLayout(jpn_cuerpo);
        jpn_cuerpo.setLayout(jpn_cuerpoLayout);
        jpn_cuerpoLayout.setHorizontalGroup(
            jpn_cuerpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jpn_cuerpoLayout.createSequentialGroup()
                .addGroup(jpn_cuerpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 998, Short.MAX_VALUE)
                    .addGroup(javax.swing.GroupLayout.Alignment.LEADING, jpn_cuerpoLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(jLabel19)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jtf_cantidadpiezas, javax.swing.GroupLayout.PREFERRED_SIZE, 68, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jLabel7)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                        .addGroup(jpn_cuerpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(jtf_materialusado, javax.swing.GroupLayout.PREFERRED_SIZE, 82, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jchbx_veridinsumo))
                        .addGap(53, 53, 53)
                        .addComponent(jpn_updatedetalle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
                .addContainerGap())
        );
        jpn_cuerpoLayout.setVerticalGroup(
            jpn_cuerpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jpn_cuerpoLayout.createSequentialGroup()
                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 302, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(jpn_cuerpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jpn_updatedetalle, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jpn_cuerpoLayout.createSequentialGroup()
                        .addGroup(jpn_cuerpoLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(jtf_materialusado, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel19)
                            .addComponent(jtf_cantidadpiezas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel7))
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                        .addComponent(jchbx_veridinsumo)))
                .addContainerGap())
        );

        jTabbedPane1.addTab(resourceMap.getString("jpn_cuerpo.TabConstraints.tabTitle"), jpn_cuerpo); // NOI18N

        jPanel2.setName("jPanel2"); // NOI18N

        jScrollPane2.setName("jScrollPane2"); // NOI18N

        jtb_detalleetiqueta.setModel(this.jtable_modelo_etiqueta);
        jtb_detalleetiqueta.setName("jtb_detalleetiqueta"); // NOI18N
        jScrollPane2.setViewportView(jtb_detalleetiqueta);

        jLabel15.setText(resourceMap.getString("jLabel15.text")); // NOI18N
        jLabel15.setName("jLabel15"); // NOI18N

        jtf_folionvo.setText(resourceMap.getString("jtf_folionvo.text")); // NOI18N
        jtf_folionvo.setToolTipText(resourceMap.getString("jtf_folionvo.toolTipText")); // NOI18N
        jtf_folionvo.setName("jtf_folionvo"); // NOI18N
        jtf_folionvo.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_folionvoActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
        jPanel2.setLayout(jPanel2Layout);
        jPanel2Layout.setHorizontalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                .addGap(28, 28, 28)
                .addComponent(jLabel15)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_folionvo, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(823, Short.MAX_VALUE))
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGap(6, 6, 6)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 998, Short.MAX_VALUE)
                    .addGap(6, 6, 6)))
        );
        jPanel2Layout.setVerticalGroup(
            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()
                .addContainerGap(360, Short.MAX_VALUE)
                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel15)
                    .addComponent(jtf_folionvo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
            .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel2Layout.createSequentialGroup()
                    .addGap(14, 14, 14)
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(43, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel2.TabConstraints.tabTitle"), jPanel2); // NOI18N

        jPanel3.setName("jPanel3"); // NOI18N

        jScrollPane3.setName("jScrollPane3"); // NOI18N

        jtb_detalleexportar.setModel(this.jtable_modelo_exporta);
        jtb_detalleexportar.setName("jtb_detalleexportar"); // NOI18N
        jScrollPane3.setViewportView(jtb_detalleexportar);

        javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3);
        jPanel3.setLayout(jPanel3Layout);
        jPanel3Layout.setHorizontalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 1010, Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGap(6, 6, 6)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.DEFAULT_SIZE, 998, Short.MAX_VALUE)
                    .addGap(6, 6, 6)))
        );
        jPanel3Layout.setVerticalGroup(
            jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGap(0, 391, Short.MAX_VALUE)
            .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel3Layout.createSequentialGroup()
                    .addGap(14, 14, 14)
                    .addComponent(jScrollPane3, javax.swing.GroupLayout.PREFERRED_SIZE, 363, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(14, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel3.TabConstraints.tabTitle"), jPanel3); // NOI18N

        jPanel4.setName("jPanel4"); // NOI18N

        jLabel14.setText(resourceMap.getString("jLabel14.text")); // NOI18N
        jLabel14.setName("jLabel14"); // NOI18N

        jtf_observ_update.setText(resourceMap.getString("jtf_observ_update.text")); // NOI18N
        jtf_observ_update.setName("jtf_observ_update"); // NOI18N

        jButton1.setIcon(resourceMap.getIcon("jButton1.icon")); // NOI18N
        jButton1.setText(resourceMap.getString("jButton1.text")); // NOI18N
        jButton1.setName("jButton1"); // NOI18N
        jButton1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jButton1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
        jPanel4.setLayout(jPanel4Layout);
        jPanel4Layout.setHorizontalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jLabel14)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_observ_update, javax.swing.GroupLayout.PREFERRED_SIZE, 559, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jButton1)
                .addContainerGap(263, Short.MAX_VALUE))
        );
        jPanel4Layout.setVerticalGroup(
            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel14)
                    .addComponent(jtf_observ_update, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jButton1))
                .addContainerGap(347, Short.MAX_VALUE))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel4.TabConstraints.tabTitle"), jPanel4); // NOI18N

        jPanel5.setName("jPanel5"); // NOI18N

        jScrollPane4.setName("jScrollPane4"); // NOI18N

        jtb_detalle_expexe.setModel(this.jtable_modelo_exporta_usoexel);
        jtb_detalle_expexe.setName("jtb_detalle_expexe"); // NOI18N
        jScrollPane4.setViewportView(jtb_detalle_expexe);

        jLabel16.setText(resourceMap.getString("jLabel16.text")); // NOI18N
        jLabel16.setName("jLabel16"); // NOI18N

        jtf_folionvoexpexe.setToolTipText(resourceMap.getString("jtf_folionvoexpexe.toolTipText")); // NOI18N
        jtf_folionvoexpexe.setName("jtf_folionvoexpexe"); // NOI18N
        jtf_folionvoexpexe.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jtf_folionvoexpexeActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
        jPanel5.setLayout(jPanel5Layout);
        jPanel5Layout.setHorizontalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                .addGap(35, 35, 35)
                .addComponent(jLabel16)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jtf_folionvoexpexe, javax.swing.GroupLayout.PREFERRED_SIZE, 93, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(816, Short.MAX_VALUE))
            .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel5Layout.createSequentialGroup()
                    .addGap(6, 6, 6)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.DEFAULT_SIZE, 998, Short.MAX_VALUE)
                    .addGap(6, 6, 6)))
        );
        jPanel5Layout.setVerticalGroup(
            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel5Layout.createSequentialGroup()
                .addContainerGap(360, Short.MAX_VALUE)
                .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(jLabel16)
                    .addComponent(jtf_folionvoexpexe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addContainerGap())
            .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGroup(jPanel5Layout.createSequentialGroup()
                    .addGap(28, 28, 28)
                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 322, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap(41, Short.MAX_VALUE)))
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel5.TabConstraints.tabTitle"), jPanel5); // NOI18N

        jPanel6.setName("jPanel6"); // NOI18N

        jScrollPane5.setName("jScrollPane5"); // NOI18N

        jepn_fotos.setContentType(resourceMap.getString("jepn_fotos.contentType")); // NOI18N
        jepn_fotos.setName("jepn_fotos"); // NOI18N
        jScrollPane5.setViewportView(jepn_fotos);

        javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
        jPanel6.setLayout(jPanel6Layout);
        jPanel6Layout.setHorizontalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 1000, Short.MAX_VALUE)
                .addContainerGap())
        );
        jPanel6Layout.setVerticalGroup(
            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup()
                .addComponent(jScrollPane5, javax.swing.GroupLayout.DEFAULT_SIZE, 380, Short.MAX_VALUE)
                .addContainerGap())
        );

        jTabbedPane1.addTab(resourceMap.getString("jPanel6.TabConstraints.tabTitle"), jPanel6); // NOI18N

        jMenuBar1.setName("jMenuBar1"); // NOI18N

        jMenu1.setText(resourceMap.getString("jMenu1.text")); // NOI18N
        jMenu1.setName("jMenu1"); // NOI18N

        jmni_imprimir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_I, java.awt.event.InputEvent.ALT_MASK));
        jmni_imprimir.setIcon(resourceMap.getIcon("jmni_imprimir.icon")); // NOI18N
        jmni_imprimir.setText(resourceMap.getString("jmni_imprimir.text")); // NOI18N
        jmni_imprimir.setName("jmni_imprimir"); // NOI18N
        jmni_imprimir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_imprimirActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_imprimir);

        jmni_imprimircompleto.setText(resourceMap.getString("jmni_imprimircompleto.text")); // NOI18N
        jmni_imprimircompleto.setName("jmni_imprimircompleto"); // NOI18N
        jmni_imprimircompleto.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_imprimircompletoActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_imprimircompleto);

        jmni_salir.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.ALT_MASK));
        jmni_salir.setIcon(resourceMap.getIcon("jmni_salir.icon")); // NOI18N
        jmni_salir.setText(resourceMap.getString("jmni_salir.text")); // NOI18N
        jmni_salir.setName("jmni_salir"); // NOI18N
        jmni_salir.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_salirActionPerformed(evt);
            }
        });
        jMenu1.add(jmni_salir);

        jMenuBar1.add(jMenu1);

        jMenu2.setText(resourceMap.getString("jMenu2.text")); // NOI18N
        jMenu2.setName("jMenu2"); // NOI18N

        jmni_escape.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_ESCAPE, 0));
        jmni_escape.setText(resourceMap.getString("jmni_escape.text")); // NOI18N
        jmni_escape.setName("jmni_escape"); // NOI18N
        jmni_escape.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                jmni_escapeActionPerformed(evt);
            }
        });
        jMenu2.add(jmni_escape);

        jMenuBar1.add(jMenu2);

        setJMenuBar(jMenuBar1);

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                    .addComponent(jTabbedPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 1015, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jpn_encabezado, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addComponent(jpn_encabezado, javax.swing.GroupLayout.PREFERRED_SIZE, 83, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGap(15, 15, 15)
                .addComponent(jTabbedPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 419, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void jmni_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_salirActionPerformed
        // TODO add your handling code here:
    if(JOptionPane.showConfirmDialog(null, "Realmente Desea Salir?")==0)
        {
            this.dispose();
        }
    }//GEN-LAST:event_jmni_salirActionPerformed

    private void jtf_observacionesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_observacionesActionPerformed
        // TODO add your handling code here:
        //this.jtf_canpzaingresa.requestFocus();
}//GEN-LAST:event_jtf_observacionesActionPerformed

    private void jbtn_salirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_salirActionPerformed
        // TODO add your handling code here:
        //x.cierraConexion();
        this.jmni_salirActionPerformed(evt);
}//GEN-LAST:event_jbtn_salirActionPerformed

    private void jbtn_helpayudameActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_helpayudameActionPerformed
        // TODO add your handling code here:
        //  this.ayuda();
}//GEN-LAST:event_jbtn_helpayudameActionPerformed

    private void jbtn_imprimir3ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_imprimir3ActionPerformed
        // TODO add your handling code here:
         float filas = this.jtable_modelo_maquilla.getRowCount() ;
        float paginas = filas /35;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimirbasica(ni, 0, this.jtf_id.getText());
             }

}//GEN-LAST:event_jbtn_imprimir3ActionPerformed

    private void jmni_imprimirActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_imprimirActionPerformed
        // TODO add your handling code here:
          float filas = this.jtable_modelo_maquilla.getRowCount() ;
        float paginas = filas /35;
        int ni=0;
        for(ni=0;ni<paginas;ni++)
             {
                 this.imprimirbasica(ni, 0, this.jtf_id.getText());
             }
    }//GEN-LAST:event_jmni_imprimirActionPerformed

    private void jmni_escapeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_escapeActionPerformed
        // TODO add your handling code here:
        this.jmni_salirActionPerformed(evt);
    }//GEN-LAST:event_jmni_escapeActionPerformed

    private void jbtn_detactualizaActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jbtn_detactualizaActionPerformed
        // TODO add your handling code here:
     if(JOptionPane.showConfirmDialog(null, "Estan Correctos sus Datos?")==0)
        {
         if (this.jcbx_nuevo.isSelected()==false)
            {
                if ((this.jtf_anchotela.getText().length() > 0) && (this.jtf_piezas.getText().length() > 0) && (this.jtf_pzasxpake.getText().length() > 0))
                    {
                        this.detallerequisicion_actualiza(0, this.jtf_idserial.getText(), this.jtf_idinsumo.getText(), this.jtf_anchotela.getText(), this.jtf_piezas.getText(), this.jtf_pzasxpake.getText(), this.jtf_detalleobser.getText());
                    }
                else
                    {

                    }
            }
         else
            {
                 if ((this.jtf_anchotela.getText().length() > 0) && (this.jtf_piezas.getText().length() > 0) && (this.jtf_pzasxpake.getText().length() > 0))
                    {
                        this.detallerequisicion_actualiza(1, this.jtf_id.getText(), this.jtf_idinsumo.getText(), this.jtf_anchotela.getText(), this.jtf_piezas.getText(), this.jtf_pzasxpake.getText(), this.jtf_detalleobser.getText());
                    }
                else
                    {

                    }
            }
        }
        
    }//GEN-LAST:event_jbtn_detactualizaActionPerformed

    private void jcbx_nuevoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jcbx_nuevoActionPerformed
        // TODO add your handling code here:
        this.jtf_idinsumo.setEditable(true);
        
}//GEN-LAST:event_jcbx_nuevoActionPerformed

    private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton1ActionPerformed
        // TODO add your handling code here:
       if(JOptionPane.showConfirmDialog(null, "Desea Actualizar Observacion?")==0)
        {
            this.actualiza_docto(1, this.jtf_id.getText(),this.jtf_observ_update.getText().trim().replace(",", ""));
        }
    }//GEN-LAST:event_jButton1ActionPerformed

    private void jTabbedPane1StateChanged(javax.swing.event.ChangeEvent evt) {//GEN-FIRST:event_jTabbedPane1StateChanged
        // TODO add your handling code here:
          int indexactual=this.jTabbedPane1.getSelectedIndex();
         if((indexactual==3))
            {
                this.jtf_observ_update.setText(this.jtf_observaciones.getText().trim());
            }
          if((indexactual==1))
            {
                this.jtf_folionvo.requestFocus();
            }
    }//GEN-LAST:event_jTabbedPane1StateChanged

    private void jmni_imprimircompletoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jmni_imprimircompletoActionPerformed
        // TODO add your handling code here:
         this.imprimir(0, 0, this.jtf_id.getText());
    }//GEN-LAST:event_jmni_imprimircompletoActionPerformed

    private void jtf_folionvoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_folionvoActionPerformed
        // TODO add your handling code here:
         if(JOptionPane.showConfirmDialog(null, "Desea cargar Este folio para etiqueta?")==0)
             {
                if(this.jtf_id.getText().toString().equals(this.jtf_folionvo.getText().toString()))
                    {
                        JOptionPane.showMessageDialog(null,"Error Folio ya esta cargado", "Sistema Integral(Exportar a Etiquetado) : Error",1);
                    }
                else
                     {
                        this.cargar_datos_detalle_etiqueta(0, this.jtf_folionvo.getText());
                        
                     }
                
             }
    }//GEN-LAST:event_jtf_folionvoActionPerformed

    private void jtf_folionvoexpexeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jtf_folionvoexpexeActionPerformed
        // TODO add your handling code here:
    if(JOptionPane.showConfirmDialog(null, "Desea cargar Folio Exportar a Excel?")==0)
             {
                if(this.jtf_id.getText().toString().equals(this.jtf_folionvoexpexe.getText().toString()))
                    {
                        JOptionPane.showMessageDialog(null,"Error Folio ya esta cargado", "Sistema Integral(Exportar a Excel) : Error",1);
                    }
                else
                     {
                        this.cargar_datos_detalle_expusoexe(0, this.jtf_folionvoexpexe.getText());
                     }

             }
}//GEN-LAST:event_jtf_folionvoexpexeActionPerformed

    private void jchbx_veridinsumoActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jchbx_veridinsumoActionPerformed
        // TODO add your handling code here:
        laser_entradas_catalogo_patrones_detalle flecpd=new laser_entradas_catalogo_patrones_detalle(1,this.jtf_idinsumo.getText(),"");
        flecpd.pack();
        flecpd.setVisible(true);
}//GEN-LAST:event_jchbx_veridinsumoActionPerformed
 private void jtb_insumosMouseClicked(java.awt.event.MouseEvent evt) {
        // TODO add your handling code here:
    }
    /**
    * @param args the command line arguments
    */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {
            public void run() {
                new laser_requisicion_detalle().setVisible(true);
            }
        });
    }

    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton jButton1;
    private javax.swing.JLabel jLabel1;
    private javax.swing.JLabel jLabel10;
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JLabel jLabel13;
    private javax.swing.JLabel jLabel14;
    private javax.swing.JLabel jLabel15;
    private javax.swing.JLabel jLabel16;
    private javax.swing.JLabel jLabel19;
    private javax.swing.JLabel jLabel2;
    private javax.swing.JLabel jLabel3;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JLabel jLabel6;
    private javax.swing.JLabel jLabel7;
    private javax.swing.JLabel jLabel8;
    private javax.swing.JLabel jLabel9;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    private javax.swing.JPanel jPanel1;
    private javax.swing.JPanel jPanel2;
    private javax.swing.JPanel jPanel3;
    private javax.swing.JPanel jPanel4;
    private javax.swing.JPanel jPanel5;
    private javax.swing.JPanel jPanel6;
    private javax.swing.JScrollPane jScrollPane1;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JScrollPane jScrollPane4;
    private javax.swing.JScrollPane jScrollPane5;
    private javax.swing.JTabbedPane jTabbedPane1;
    private javax.swing.JButton jbtn_detactualiza;
    private javax.swing.JButton jbtn_helpayudame;
    private javax.swing.JButton jbtn_imprimir3;
    private javax.swing.JButton jbtn_salir;
    private javax.swing.JCheckBox jcbx_nuevo;
    private javax.swing.JCheckBox jchbx_veridinsumo;
    private javax.swing.JEditorPane jepn_fotos;
    private javax.swing.JMenuItem jmni_escape;
    private javax.swing.JMenuItem jmni_imprimir;
    private javax.swing.JMenuItem jmni_imprimircompleto;
    private javax.swing.JMenuItem jmni_salir;
    private javax.swing.JPanel jpn_cuerpo;
    private javax.swing.JPanel jpn_encabezado;
    private javax.swing.JPanel jpn_updatedetalle;
    private javax.swing.JTable jtb_detalle_expexe;
    private javax.swing.JTable jtb_detalleetiqueta;
    private javax.swing.JTable jtb_detalleexportar;
    private javax.swing.JTable jtb_insumos;
    private javax.swing.JTextField jtf_anchotela;
    private javax.swing.JTextField jtf_cantidadpiezas;
    private javax.swing.JTextField jtf_detalleobser;
    private javax.swing.JTextField jtf_fechadocto;
    private javax.swing.JTextField jtf_folionvo;
    private javax.swing.JTextField jtf_folionvoexpexe;
    private javax.swing.JTextField jtf_id;
    private javax.swing.JTextField jtf_idcliente;
    private javax.swing.JTextField jtf_idinsumo;
    private javax.swing.JTextField jtf_idserial;
    private javax.swing.JTextField jtf_idstatus;
    private javax.swing.JTextField jtf_materialusado;
    private javax.swing.JTextField jtf_observ_update;
    private javax.swing.JTextField jtf_observaciones;
    private javax.swing.JTextField jtf_piezas;
    private javax.swing.JTextField jtf_pzasxpake;
    private javax.swing.JTextField jtf_tipomaquila;
    // End of variables declaration//GEN-END:variables
    private laser_entradas_imprimir objimpresora;
}
